import os

class Config:
    # 密钥
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'your-secret-key-change-in-production'
    
    # 数据库配置
    SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
        'mysql+pymysql://root:123456@localhost:33061/autotest'
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    
    # 路径配置
    BASE_DIR = os.path.abspath(os.path.dirname(__file__))
    STATIC_FOLDER = os.path.join(BASE_DIR, '..', '..', 'static')
    TEMPLATE_FOLDER = os.path.join(BASE_DIR, '..', '..', 'templates')
    SCREENSHOTS_FOLDER = os.path.join(BASE_DIR, '..', '..', 'screenshots')